﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Enterprise.Infrastructure;
using Enterprise.Model.Note;
using Enterprise.Service.Note;
namespace Enterprise.UI.Web.Modules.Notice
{
    public partial class Notices : System.Web.UI.Page
    {
       protected DateTime dt = (DateTime)Utility.sink("dt", Utility.MethodType.Get, 0, 0, Utility.DataType.Date);
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                OnStart();
            }
        }

        private void OnStart()
        {
            NoteService nService = new NoteService();
            var list = nService.NoteList().Where(p => p.NUSERID == Utility.Get_UserId && Convert.ToDateTime(p.NCREATETIME.ToShortDateString()) == dt).ToList();
            Repeater1.DataSource = list;
            Repeater1.DataBind();
        }

    }
}